using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection.Emit;
using System.Text;
using System.Threading.Tasks;
using bitzhuwei.Compiler;

namespace bitzhuwei.AnsiCFormat {
    /// <summary>
    /// Correspond to the Vn node type_qualifier in the grammar(AnsiC).
    /// </summary>
    internal partial class Vntype_qualifier : IFullFormatter {
        // [127]=type_qualifier : 'const' ;
        // [128]=type_qualifier : 'volatile' ;

        private readonly TokenRange _scope;
        public TokenRange Scope => _scope;

        public void Format(TextWriter writer, FormatContext context) {
            throw new NotImplementedException();
        }

        public void FullFormat(BlankConfig preConfig, TextWriter writer, FormatContext context) {
            context.PrintBlanksAnd(this.token, preConfig, writer);
        }

        public IEnumerable<string> YieldTokens(TextWriter writer, FormatContext context) {
            throw new NotImplementedException();
        }

        internal readonly Token token;

        internal Vntype_qualifier(Token token) {
            this.token = token;
            this._scope = new TokenRange(token);
        }

    }
}
